#include <stdio.h>
int main()
{
    int a;
    int i = 0;
    scanf("%d", &a);
    while (a != 1)
    {
        ++i;
        if (a % 2 != 0)
            a = (3 * a + 1) / 2;
        else
            a = a / 2;
    }
    printf("%d", i);
}